/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package cranim.simulation.units;

import cranim.Constants;
import static cranim.Constants.SCARGO;
import cranim.simulation.Unit;

/**
 *
 * @author Benedikt
 */
public abstract class AbstractUnit implements Constants{
 
    public double baseArms, baseShields, baseHull;
    public int unitType;
    
    int baseSpeed;
    int drive;
    int rfscargo;
    int rflcargo;
    int rflfighter;
    int rfhfighter;
    int rfcruiser;
    int rfbship;
    int rfcolship;
    int rfrecycler;
    int rfprobe;
    int rfbomber;
    int rfsolsat;
    int rfdestroyer;
    int rfdeathstar;
    int rfbcruiser;
    int rfrlauncher;
    int rfllaser;
    int rfhlaser;
    int rfgauss;
    int rfioncan;
    int rfplasmaturr;
    int rfsshield;
    int rflshield;
    
    public int getType(){
        return unitType;
    }
    
    public int getAbstractRF(Unit opponent){
        if (opponent.getType() == SCARGO){
            return rfscargo;
        }
        else if (opponent.getType() == LCARGO){
            return rflcargo;
        }
        else if (opponent.getType() == LFIGHTER){
            return rflfighter;
        }
        else if (opponent.getType() == HFIGHTER){
            return rfhfighter;
        }
        else if (opponent.getType() == CRUISER){
            return rfcruiser;
        }
        else if (opponent.getType() == BSHIP){
            return rfbship;
        }
        else if (opponent.getType() == COLSHIP){
            return rfcolship;
        }
        else if (opponent.getType() == RECYCLER){
            return rfrecycler;
        }
        else if (opponent.getType() == PROBE){
            return rfprobe;
        }
        else if (opponent.getType() == SOLSAT){
            return rfsolsat;
        }
        else if (opponent.getType() == BOMBER){
            return rfbomber;
        }
        else if (opponent.getType() == DESTROYER){
            return rfdestroyer;
        }
        else if (opponent.getType() == DEATHSTAR){
            return rfdeathstar;
        }
        else if (opponent.getType() == BCRUISER){
            return rfbcruiser;
        }
        else if (opponent.getType() == RLAUNCHER){
            return rfrlauncher;
        }
        else if (opponent.getType() == LLASER){
            return rfllaser;
        }
        else if (opponent.getType() == HLASER){
            return rfhlaser;
        }
        else if (opponent.getType() == GAUSS){
            return rfgauss;
        }
        else if (opponent.getType() == IONCAN){
            return rfioncan;
        }
        else if (opponent.getType() == PLASMATUR){
            return rfplasmaturr;
        }
        else if (opponent.getType() == SSHIELD){
            return rfsshield;
        }
        else if (opponent.getType() == LSHIELD){
            return rflshield;
        }
        else{            
            System.out.println("Critical Error");
            System.out.println("Opponent class not found");
            return -1;
        }
    }
    
    
}
